﻿using GGetTestService.Middleware;

namespace Microsoft.AspNetCore.Builder
{
    public static class MyMiddlewareExtensions
    {
        /// <summary>
        /// 添加全局异常中间件
        /// </summary>
        /// <param name="builder"></param>
        /// <returns></returns>
        public static IApplicationBuilder UseMyExceptionMiddleware(this IApplicationBuilder builder)
        {
            return builder.UseMiddleware<ExceptionMiddleware>();
        }
    }
}